package com.yuan.base.framework;

import android.text.TextUtils;

import com.yuan.base.utils.PreferencesUtils;


/**
 * token管理
 */

public class BaseTokenManager {

	private static String token;

	public static String getToken() {
		if (TextUtils.isEmpty(token)) {
			token = PreferencesUtils.getString(BaseAppContext.getInstance(), BaseContant.BasePreferences.TOKEN_ID, "");
		}
		return token;
	}

	public static void setToken(String token) {
		BaseTokenManager.token = token;
		PreferencesUtils.putString(BaseAppContext.getInstance(), BaseContant.BasePreferences.TOKEN_ID, token);
	}
}
